<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

	<h:form id="createTravelForm">
		<rich:panel>
			<f:facet name="header"><h:outputText value="#{messages['travel.create.aboutToCreateTravel']}"/> </f:facet>   
			<h:panelGrid >  
			<s:decorate id="travelNameField" template="/layout/edit.xhtml">
                <ui:define name="label"><h:outputText value="#{messages['travel.create.travelName']}"/></ui:define>
                <h:inputText id="travelName"
                       required="true"
                           size="45"
                      maxlength="45"
                          value="#{travelCreationData.travelName}">
                    <a:support event="onblur" reRender="travelNameField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>
            </h:panelGrid>
            
            <h:panelGrid >
            <s:decorate id="seatAmountField" template="/layout/edit.xhtml">
                <ui:define name="label"><h:outputText value="Seat amount available"/></ui:define>
                <rich:inputNumberSlider minValue="1" maxValue="10" step="1" enableManualInput="false" value="#{travelCreationData.seatAmount}"/>
                	
                
            </s:decorate>
            </h:panelGrid>
            
			<h:panelGrid >  
			<h:selectOneRadio value="#{travelCreationData.locationType}">
				<f:selectItem itemValue="city" itemLabel="Choose city"/>
				<f:selectItem itemValue="maps" itemLabel="use gMaps"/>
			</h:selectOneRadio> 
			</h:panelGrid>
		</rich:panel>

        
        <div class="actionButtons">

            <h:commandButton id="continue"
                          value="Continue"
                         action="#{createTravelBean.chooseNameSeatsAndLocationTypeAction}"/>
        </div>
		
	</h:form>
        
        
</ui:define>
</ui:composition>
